﻿<UserControl x:Class="Microsoft.Research.ScientificWorkflow.UIDesigner.Monitor.PerformanceView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto" AutomationProperties.AutomationId="AIdPerformanceControl">
    <UserControl.Resources>
        <Style TargetType="{x:Type TextBlock}" >
            <Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text }"/>
            <Setter Property="TextTrimming" Value="CharacterEllipsis"/>
        </Style>
    </UserControl.Resources>
    <Border BorderThickness=".5" BorderBrush="Black" AutomationProperties.AutomationId="AIdPerformanceBorder" >
        <Grid AutomationProperties.AutomationId="AIdGrid">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <ListView Name="listCounters" HorizontalAlignment="Stretch" Grid.Column="0" SelectionChanged="CounterSelectionChanged"  IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding}">
                <ListView.View>
                    <GridView>
                        <GridViewColumn  Width="140"  DisplayMemberBinding="{Binding Path=Name}">
                            <GridViewColumn.Header>
                                <TextBlock Text="Counters" FontWeight="Bold"></TextBlock>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>

            <Grid Grid.Column="1" >
                <WindowsFormsHost Name="GraphViewerHost" Width="Auto" Height="Auto" />
            </Grid>
        </Grid>
    </Border>
</UserControl>
